package sv.gob.mtps.colectivas.service;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import sv.gob.mtps.colectivas.dao.SolicitudesDAO;
import sv.gob.mtps.colectivas.model.TbSolicitud;
@Service
public class SolicitudesServiceImpl implements SolicitudesService {
	
	@Autowired
	SolicitudesDAO solicitudesDAO;

	@Transactional
	public void addSolicitud(TbSolicitud tbSolicitud) {
		// TODO Auto-generated method stub
		solicitudesDAO.addSolicitud(tbSolicitud);

	}

	@Transactional
	public void updateSolicitud(TbSolicitud tbSolicitud) {
		// TODO Auto-generated method stub
		solicitudesDAO.updateSolicitud(tbSolicitud);

	}

	@Transactional
	public void deleteSolicitud(Integer idSolicitud) {
		// TODO Auto-generated method stub
		solicitudesDAO.deleteSolicitud(idSolicitud);

	}

	@Transactional
	public List<TbSolicitud> listSolicitudes() {
		// TODO Auto-generated method stub
		return solicitudesDAO.listSolicitudes();
	}

	@Transactional
	public TbSolicitud findSolicitud(Integer id) {
		// TODO Auto-generated method stub
		return solicitudesDAO.findSolicitud(id);
	}

}
